package com.dxjy.demo.entity;

/**
 * @Author: zhang
 * @Date: 2019/8/2 10:33
 * @Description: 响应结果枚举类
 */
public enum ResponseCode {

    SUCCESS(0, "success"),

    ERROR(500, "服务出错，请联系管理员"),

    USER_NOT_EXIST(101, "该用户不存在！"),

    USER_DISABLE(102, "该用户已停用！"),

    LOGIN_TYPE_ERROR(103, "用户登录类型不匹配！"),

    CODE_ERROR(104, "验证码错误，请重试！"),

    CODE_INVALID(104, "验证码过期，请重试！"),

    FIRST_LOGIN(201, "首次登陆，请验证！"),

    MISS_HEADER(400, "请求header出错："),

    NO_PERMISSION(401, "您没有权限访问！"),

    TOKEN_AUTHENTICATION_FAILED(402, "Token认证失败！"),

    PARAMETER_ERROR(403, "参数异常："),

    NOT_FOUND(404, "路径出错："),

    METHOD_NOT_SUPPORTED(405, "请求方法不支持：");


    private int code;
    private String message;

    ResponseCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
